/*
 * @Author: hyw 1819249230@qq.com
 * @Date: 2024-08-01 09:46:02
 * @LastEditors: hyw 1819249230@qq.com
 * @LastEditTime: 2024-08-01 10:07:17
 * @FilePath: \点歌台\src\utils\tool.ts
 * @Description: 
 * 
 * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved. 
 */



/**
 * @Author: hyw 1819249230@qq.com
 * @Date: 2024-08-01 09:57:15
 * @description: 跳转不是tab路由
 * @param {*} item 跳转地址
 * @return {*}
 */
export function tos(item) {
  uni.navigateTo({
    url: item
  });
}
/**
 * @Author: hyw 1819249230@qq.com
 * @Date: 2024-08-01 10:01:08
 * @description: 复制
 * @param {*} item
 * @return {*}
 */
export function copy(item) {
  uni.setClipboardData({
    data: item,
    success: function() {
      uni.showToast({
        title: '复制成功',
        icon: 'none'
      });
    },
    fail: function() {
      uni.showToast({
        title: '复制失败',
        icon: 'none'
      });
    }
  });
}
/**
 * @Author: hyw 1819249230@qq.com
 * @Date: 2024-08-01 10:02:19
 * @description: 拨打电话
 * @param {*} item
 * @return {*}
 */
export function dial(item) {
  uni.makePhoneCall({
    phoneNumber: item //仅为示例
  });
}
/**
 * @Author: hyw 1819249230@qq.com
 * @Date: 2024-08-05 13:40:55
 * @description: 
 * @param {any} item 判断值
 * @param {any} text 判断值
 * @param {any} txt  提示词
 * @return {*}
 */
export function judge(item, text, txt) {
  if (item == text) {
    uni.showToast({
      title: txt,
      icon: 'none',
    })
    return false
  } else {
    return true
  }
}
/**
 * @Author: hyw 1819249230@qq.com
 * @Date: 2024-08-05 13:45:25
 * @description: 提示
 * @param {any} item
 * @return {*}
 */
export function hint(item) {
  uni.showToast({
    title: item,
    icon: 'none'
  })
}